<meta name="content-type" content="text/html; charset=UTF-8" />
<div>
	<form class="form-horizontal" role="form" name="taskForm" action="yueyogaAdmin/searchTasks.jhtml" method="post">
		<div class="form-group">
			<label for="selGZAP" class="col-sm-1 control-label">工作安排</label>
			<div class="col-sm-3">
				<select class="selectpicker show-tick" data-width="100%"
					name="subStatusId" id="selGZAP">
					<option value=""> </option>
					<option value="">全部</option>
					<!--#for(Status s: taskTypes)-->
					<option value="${s.id}">${s.name}</option>
					<!-- #end -->
				</select>
			</div>
			<label for="selTaskMember"
				class="col-sm-1 control-label">会员</label>
			<div class="col-sm-3">
				<select class="selectpicker show-tick" data-live-search="true"
					data-width="100%" name="memberId" id="selHY">
					<option value=""> </option>
					<option value="">全部</option>
					<!--#for(Member m: members)-->
						<option value="${m.memberid}">${m.name}</option>
					<!-- #end -->
				</select>
			</div>
			<br /> <br /> 
			 <label for="inputresponsibles"
				class="col-sm-1 control-label">负责人</label>
			<div class="col-sm-3">
				<select id="selFZR" data-live-search="true"
					class="selectpicker show-tick" data-width="100%" name="resporId">
					<option value=""> </option>
					<option value="">全部</option>
					<!-- #for(GroupUserModel resp:responsibles) -->
					<option value="${resp.id}">${resp.name}</option>
					<!-- #end -->
				</select>
			</div>
			<label for="selHYZT" class="col-sm-1 control-label">会员状态</label>
			<div class="col-sm-3">
				<select class="selectpicker show-tick"
					data-width="100%" name="memberStatus" id="selHYZT">
					<option value=""> </option>
					<option value="">全部</option>
					<!--#for(Status ms: memberTypes)-->
						<option value="${ms.code}">${ms.name}</option>
					<!-- #end -->
				</select>
			</div>
			<br><br>
			 <label for="selRWZT"
				class="col-sm-1 control-label">任务状态</label>
			<div class="col-sm-3">
				<select class="selectpicker show-tick" 
					data-width="100%" name="taskStatus" id="selRWZT">
					<option value=""> </option>
					<option value="">全部</option>
					<option value="0">已取消</option>
					<option value="1">进行中</option>
					<option value="2">已完成</option>
				</select>
			</div>
			<label for="selTaskUser" class="col-sm-1 control-label">创建人</label>
			<div class="col-sm-3">
				<select class="selectpicker show-tick" data-live-search="true"
					data-width="100%" name="creatorId" id="selCJR">
					<option value=""> </option>
					<option value="">全部</option>
					<!-- #for(User us:user) -->
					<option value="${us.id}">${us.userDetail.name==null?us.username:us.userDetail.name}</option>
					<!-- #end -->
				</select>
			</div>
			
			<br /> <br /><label for="txtTaskName" class="col-sm-1 control-label">任务名称</label>
			<div class="col-sm-3">
				<input type="text" class="form-control" name="taskName"
					id="txtTaskName" value="${taskName}">
			</div>
			<br /> <br /><br /> <br />
			 <label for="txtFinishStart"
				class="col-sm-1 control-label">到期时间</label>
			<div class="col-sm-3">
                <div class='input-group date' id='txtFinishStart' data-date-format="YYYY-MM-DD">
                    <input name="beginExpiryDate" type='text' class="form-control" value="${beginExpiryDate}" />
                    <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span>
                    </span>
                </div>
			</div>
			<label for="txtFinishEnd" class="panel-searh-zhi">至</label>
			<div class="col-sm-3">
                <div class='input-group date' id='txtFinishEnd' data-date-format="YYYY-MM-DD">
                    <input name="endExpiryDate" type='text' class="form-control" value="${endExpiryDate}" />
                    <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span>
                    </span>
                </div>
			</div>
			<br /> <br />
			<br /> <br />
			<input type="hidden" name="pageNo" id="hidPageNo" />
			<input type="hidden" value="block" name="display"/>
			<div class="panel-db-search">
				<button type="button" class="btn-ade-default">搜索</button>
			</div>
		</div>
	</form>
</div>
<script>
	$(function() {
		$("#selGZAP").select2('val', '${subStatusId}');
		$("#selHY").select2('val', '${memberId}');
		$("#selCJR").select2('val', '${creatorId}');
		$("#selFZR").select2('val', '${resporId}');
		$("#selRWZT").select2('val', '${taskStatus}');
		$("#selHYZT").select2('val', '${memberStatus}');
		
		$("#selGZAP").select2({
			width: "100%",
			minimumResultsForSearch: -1
		});
		
		$("#selHYZT").select2({
			width: "100%",
			minimumResultsForSearch: -1
		});
		
		$("#selRWZT").select2({
			width: "100%",
			minimumResultsForSearch: -1
		});
	});
	
	$(".btn-ade-default").click(function() {
		var pageNo = $("#txtPageNumber").val();
		$("#hidPageNo").val(pageNo);
		document.taskForm.submit();
	});
	
	$("#txtFinishStart").datetimepicker({
		language: "zh-CN",
		pickTime: false
	});
	
	$("#txtFinishEnd").datetimepicker({
		language: "zh-CN",
		pickTime: false
	});
</script>